#ifndef USERINFOWIDGET_H
#define USERINFOWIDGET_H

#include <QDialog>
#include <QWidget>
#include <QLabel>
#include <QGridLayout>
#include <QPushButton>
#include <QPainter>
#include <QPainterPath>

#include "model/data.h"

using model::UserInfo;

class userInfoWidget : public QDialog
{
    Q_OBJECT
public:
    userInfoWidget(QWidget* parent,const UserInfo& userinfo);

    // 鼠标离开事件
    void leaveEvent(QEvent* event) override;

    // 绘制圆角
    void paintEvent(QPaintEvent *event) override;

private:
    const UserInfo& userInfo;

    QGridLayout* glayout;
    QPushButton* avatarBtn;
    QLabel* idTag;
    QLabel* idLabel;
    QLabel* nameTag;
    QLabel* nameLabel;
    QLabel* phoneTag;
    QLabel* phoneLabel;

    QPushButton* applyBtn;
    QPushButton* sendMessageBtn;
    QPushButton* delFriendBtn;


};

#endif // USERINFOWIDGET_H
